/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.app.mockexam.theory.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.TreeService;
import com.jeesite.modules.app.mockexam.theory.entity.AppExaminateTheory;
import com.jeesite.modules.app.mockexam.theory.dao.AppExaminateTheoryDao;
import com.jeesite.modules.file.utils.FileUploadUtils;

/**
 * 理论考试对象表Service
 * @author zpp
 * @version 2020-02-08
 */
@Service
@Transactional(readOnly=true)
public class AppExaminateTheoryService extends TreeService<AppExaminateTheoryDao, AppExaminateTheory> {
	
	/**
	 * 获取单条数据
	 * @param appExaminateTheory
	 * @return
	 */
	@Override
	public AppExaminateTheory get(AppExaminateTheory appExaminateTheory) {
		return super.get(appExaminateTheory);
	}
	
	/**
	 * 查询列表数据
	 * @param appExaminateTheory
	 * @return
	 */
	@Override
	public List<AppExaminateTheory> findList(AppExaminateTheory appExaminateTheory) {
		return super.findList(appExaminateTheory);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param appExaminateTheory
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(AppExaminateTheory appExaminateTheory) {
		super.save(appExaminateTheory);
		// 保存上传图片
		FileUploadUtils.saveFileUpload(appExaminateTheory.getId(), "appExaminateTheory_image");
		// 保存上传附件
		FileUploadUtils.saveFileUpload(appExaminateTheory.getId(), "appExaminateTheory_file");
	}
	
	/**
	 * 更新状态
	 * @param appExaminateTheory
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(AppExaminateTheory appExaminateTheory) {
		super.updateStatus(appExaminateTheory);
	}
	
	/**
	 * 删除数据
	 * @param appExaminateTheory
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(AppExaminateTheory appExaminateTheory) {
		super.delete(appExaminateTheory);
	}
	
}